package com.hrs.enity.ro;

import com.hrs.util.VerificationUtil;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;

/**
 * @author 摆渡人
 * @description
 * @date 2023/1/13 2:50
 */
@Data
public class UserRegisterRo {

    @ApiModelProperty(value = "姓名",required = true)
    @NotBlank(message = "请输入姓名")
    private String actualName;

    @ApiModelProperty(value = "手机号",required = true)
    @NotBlank(message = "请输入手机号")
    @Pattern(regexp = VerificationUtil.PHONE_REGEXP,message = "手机号格式错误")
    private String phone;

    @ApiModelProperty(value = "密码",required = true)
    @NotBlank(message = "请输入密码")
    @Pattern(regexp = VerificationUtil.PWD_REGEXP,message = "^[A-Za-z0-9.]{6,15}$")
    private String password;

    @ApiModelProperty(value = "角色id",required = true)
    @NotNull(message = "请选择角色")
    private Integer roleId;
}
